home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_08
/
saks
/
inserter.cpp
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1994-06-12
|
306 b
|
14 lines
Listing 8 - a operator<< for strq using the new apply function(s)
instead of a global variable
void print_str(void *e, void *args)
{
*(ostream *)args << ' ' << *(str *)e;
}
inline ostream &operator<<(ostream &os, strq &q)
{
q.apply(print_str, &os);
return os;
}